package coderead.tomcat;
/**
 * @Copyright 源码阅读网 http://coderead.cn
 */

import org.apache.catalina.Context;
import org.apache.catalina.Host;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Wrapper;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;

import javax.servlet.ServletRegistration;

/**
 * @author 鲁班大叔
 * @date 2021
 */
public class Bootstrap {

    public static void main(String[] args) throws LifecycleException {
        Tomcat tomcat = new Tomcat();

        Context context = tomcat.addWebapp("",
                "D:\\code\\tomcat-study-git\\tomcat-study\\tomcat-embedded\\target\\tomcat-embedded");

        tomcat.getConnector();

        tomcat.start();

        tomcat.getServer().await();
    }
}
